package com.oktest.measure.item.work.provider

import com.chad.library.adapter.base.entity.node.BaseNode
import com.chad.library.adapter.base.provider.BaseNodeProvider
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.oktest.measure.R
import com.oktest.measure.entity.Device
import kotlinx.android.synthetic.main.item_work_device_title.view.*

/**
 * @Author hhh
 * @Date 2020/9/22
 */
class WorkDeviceProvider : BaseNodeProvider() {
    override val itemViewType: Int = 1
    override val layoutId: Int = R.layout.item_work_device_title

    override fun convert(helper: BaseViewHolder, device: BaseNode) {
        if(device !is Device) return
        helper.itemView.apply {
            tvDeviceName.text = device.name
        }
    }

}